package com.zjm.servlet.servlet07_forward;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author ZJM
 * @date 2024/4/14 17:29
 * 请求转发
 */
public class RequestForward02Servlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("Servlet2处理");
        System.out.println("获取Servlet1的数据" + req.getAttribute("key"));
    }
}
